﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;


public partial class Login : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
            
    }
    protected void login_Click(object sender, ImageClickEventArgs e)
    {
        MatchIns.Model.TAdmin user = new MatchIns.BLL.TAdmin().GetModel(Request.Form["username"], Request.Form["pwd"]);
        if (user != null)
        {
            Session["userid"] = user.AdminId.ToString();
            Response.Redirect("~/Admin/");
        }
        else
        {
            Response.Write("<script>alert('用户名密码有误');location.href='Login.aspx';</script>");
        }
    }
}
